/*
 * @Author: HZK
 * @Date: 2020-09-22 18:36:41
 * @LastEditTime: 2020-09-22 20:28:54
 * @LastEditors: hanfengmi
 * @Description: 
 */
const {merge} = require('webpack-merge');
const baseConfig = require('./webpack.common.js'); // 引用公共的配置

const devConfig = {
    mode: 'development',
    devServer: {
        port:'8888',
        host:'localhost',
        hot: true,
    },
    module: {
        rules: [
            {
                test: /\.css$/,
                use: [
                    'style-loader',
                    'css-loader',
                ]
            },
            {
                test: /\.less$/,
                use: [
                    'style-loader',
                    'css-loader',
                    'less-loader',
                ]
            },
        ]
    },
}

module.exports = merge(devConfig, baseConfig); // 将baseConfig和devConfig合并为一个配置
